<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of cliente_model
 *
 * @author Marlon
 */
class cliente_model extends CI_Model
{

    
    function __construct()
    {
        parent::__construct();
    
    }
    function insertarCliente($datos){
         $this->db->insert('cliente',$datos);    
    }
    
    function buscarCliente($codClien){
        $cad="SELECT per.IdPersona as codPer,per.TipoDePersona as tipo, per.RUC as ruc, per.RazonSocial as razon, 
            per.Nombres as nomb, per.Apellidos as apellido,
            per.DNI as dni from Persona per, Cliente clie 
            where per.IdPersona=clie.IdCliente and clie.IdCliente=".$codClien;
        return $this->db->query($cad)->result_array();;
    }
    
}

?>